<?php

include_package( 'Xml' );

class XmlDatabaseElement extends XmlElement {

	function XmlDatabaseElement( &$oConfiguration, &$oDatabase ) {

		$this->XmlElement( 'DATABASE' );

		if ( $oConfiguration->GetProperty( 'ShowTables' ) ) {
			$this->AddElement( new XmlDatabaseTableListElement( $oConfiguration, $oDatabase->GetTables() ) );	
		}
		
		if ( $oConfiguration->GetProperty( 'ShowSeparateForeignKeyList' ) ) {
			$this->AddElement( new XmlDatabaseForeignKeyListElement( $oConfiguration, $oDatabase->GetForeignKeys() ) );	
		}
	}
}

require_once( 'XmlDatabaseTableElement.php' );
require_once( 'XmlDatabaseForeignKeyListElement.php' );

?>
